<?php
namespace Cps\Controller;
use Common\Controller\CommonController;
class AppController extends CommonController{

    /**
     * 跳转
     */
    public function tiaozhuan(){

        $appid = I('post.appid','','htmlspecialchars');
        $uid = I('post.uid','','htmlspecialchars');

        $isshow = 0;
        $onoff = 0; //搜码进来是否跳出网络错误
        switch ($appid)
        {
            case 'wx47f3a2edad028bdf': //猜歌名大师奖金版
                $isshow = 0;
                break;
            case 'wx402ce3c8d9a9de9b': //疯狂填词王奖金版
                $isshow = 0;
                if ($uid){
                    $getscreen = M('lyricist_member')->field('lock')->where(array('uid'=>$uid))->find();
                    if ($getscreen['lock']=='-1'){
                        $data = array(
                            'title'=>'服务器繁忙',
                            'appid'=>'4564645',
                            'url'=>'645464',
                            'isshow'=>1,
                        );

                        $this->returnData($data);
                    }

                }

                break;
            case 'wx9560969ff4d7461b': //疯狂猜猜歌达人小超人GO
                $isshow = 0;
                break;
            case 'wxa55789390bbb94ea': //猜歌巨星
                $isshow = 1;
                break;
            case 'wxc585cb6b9c965bcf': //速算头脑
                $isshow = 0;
                break;
            case 'wx2faae9d47390a9e7': //脑经猜歌
                $isshow = 0;
                break;
            case 'wx370386b7eb0c04bc': //猜歌空而君
                $isshow = 0;
                break;

            case 'wx7d979a630d92c3dd': //成语猜猜看奖金版
                $isshow = 0;
                if ($uid){
                    $getscreen = M('lyricist_member')->field('lock')->where(array('uid'=>$uid))->find();
                    if ($getscreen['lock']=='-1'){
                        $data = array(
                            'title'=>'服务器繁忙',
                            'appid'=>'634564',
                            'url'=>'456464',
                            'isshow'=>1,
                        );

                        $this->returnData($data);
                    }

                }
                break;
            default;
        }

        $data = array(
            'title'=>'服务器繁忙',
            'appid'=>'wx6b1c7907c5733fc9',
            'url'=>'/pages/index/index?appid=wx47f3a2edad028bdf&pages=pages/index/index',
            'isshow'=>$isshow,
            'onoff'=>$onoff,
        );

        $this->returnData($data);

    }
}